OPTIONAL TROUBLESHOOTING PROGRAMS



MCM Design's BalcheckHR board includes a 74LS42 chip and a DPDT mini-toggle
switch to select either the BalcheckHR programming or 2 programs that will run at
the system reset address 0000H.

The EEPROM on the board is 32KB and is "multi-carted" for four 8KB banks of ROM.
A DIP switch will select which 8KB bank will execute. The DIP switch settings are
indicated below.

Bank 0  00  BalcheckHR
Bank 1  01  Remote On-Board ROM
Bank 2  10  Z80 Check
Bank 3  11  BalcheckHR

EXECUTING A SELECTED EEPROM BANK

To execute the bank 0 or 3, the mini-toggle switch mentioned above must be in the
"Balcheck" position.

To execute the bank 1 or 2, the mini-toggle switch must be in the "Remote ROM"
position.

The Bally/Astrocade motherboard and either the "Remote On-Board ROM" or the
"Z80 Check" program should normally be powered on simultaneously, but this is not
a necessity. You can execute a different EEPROM 8KB bank even with the power on.

To execute the desired EEPROM 8KB bank while the power is on:

1. Set the DIP switches for the desired EEPROM bank selection.

2. Flip, if necessary, the mini-toggle switch to the correct Remote ROM/Balcheck
   position.

3. Press the system reset button to execute the selected EEPROM bank.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

THE REMOTE ON-BOARD ROM PROGRAM



THE PROGRAM REVISIONS SUMMARY

This program is a variation of the Bally/Astrocade motherboard 8KB on-board ROM,
the 1978 version, addressed 0000-1FFFH.

The revisions to the motherboard ROM are as follows:

1. New menu colors are displayed.

2. The menu credit at the bottom of the TV display reads MCM DESIGN 2018.

3. The horizontal color boundary was bumped to the right.

4. The checksum byte at 0033H was changed to 2E hex.



HOW TO EXECUTE THE REMOTE ON-BOARD ROM PROGRAM

1. Set the EEPROM multi-cart DIP switches to 01. Switch 2 is the most significant
   setting (0) and switch 1 is the least significant setting (1). The setting
  "zero" is toward the EEPROM. The setting 1 is away from the EEPROM.

2. Flip, if necessary, the mini-toggle switch near the dual display, in the
   "Remote ROM" position, toward the left, away from the EEPROM.

3. Press the system reset button, to run the remote on-board ROM program.

NOTE: Game cartridges can be run using this remote on-board ROM.



THE INTENT OF THIS PROGRAM

The intent of the remote on-board ROM is to help isolate a failure in the 
motherboard Zone B area.

When a failed motherboard will not even initialize the standard Balcheck tests,
there is a failure in the motherboard Zones A or B. These two zones were
defined in the BalcheckHR user manual doc "Standard Balcheck Tests".

If Zone A is operating and the Z80 CPU system clock input (1.789 Mhz ideal)
is present at the Z80 pin 6, then there is a failure in Zone B.

When there is a failure in Zone B, try running the remote on-board ROM program.
If the MCM Design menu appears and you can run this remote ROM, then it is
likely there is a problem related to the motherboard ROM or the ROM decoders.
You can check the ROM decoder logic gates for some sign of a failure using a
logic probe.

If the MCM Design menu does not appear, try running the optional "Z80 Check"
program on the BalcheckHR EEPROM.



THE MCM DESIGN MENU DOES NOT APPEAR WITH ATTEMPT TO RUN THE REMOTE ON-BOARD ROM
(ZONE A IS OK, SYSTEM CLOCK TO Z80 CPU IS OK)

The following are some possible reasons for the nonappearance of the menu:

1. The on-board ROM was not disabled. Check for a logic 0 at pin 4 at the ROM
   decoder chip U14. This is the SYSEN (System Enable) line. When this line is
   at logic 0, the on-board ROM Chip Select (CS, active low), pin 20, will
   remain high (disabled), as long as the U14 logic gate output pin 6 is
   working correctly.

2. Some failure in Zone B, related to the Z80 memory address and data buses,
   is preventing the Z80 CPU from executing instructions. A conflict will
   prevent the Z80 from operating properly.

3. The Z80 CPU is not operating. An internal chip failure is occuring.



EEPROM "REMOTE ON-BOARD ROM" REVISIONS
DOCUMENTED CHANGES BY MCM DESIGN TO THE STANDARD 8K ROM CHIP (1978 VERSION)

1. Change menu colors

          original              new

   0013H 06 light gray       85 yellow
         FA blue             D4 cyan
         07 white            00 black
         62 red              FA light blue


2. Change menu credit to MCM DESIGN 2018

                           original
   0E02H 28 43 29 20 42 41 4C 4C 59 20 4D 46 47 20 31 39 37 38 00
         (  C  )     B  A  L  L  Y     M  F  G     1  9  7  8

                             new
   0E02H 4D 43 4D 20 44 45 53 49 47 4E 20 20 20 20 32 30 31 38 00
         M  C  M     D  E  S  I  G  N              2  0  1  8


3. Bump value of horizontal color boundary

         old    new

   0C7FH 29     2A


4. Change checksum byte.


         old    new

   0033H 00     2E


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


THE "Z80 CHECK" PROGRAM



INTRODUCTION

When a user attempts to run the standard Balcheck tests and the dual display
will not even initialize to - - (dash dash), the motherboard has a Zone A or
Zone B failure, where Zone A is related to the motherboard power supply and
Zone B is related to the operation of the Z80 address and data buses. This,
of course, is assuming the BalcheckHR board is working ok.

The intent of the "Z80 Check" program is to visually confirm the Z80 CPU is
operating by watching the dual display to see if it counts up from 00 to FF in
hexadecimal. Note that even if the dual display does not count up indicating
the Z80 CPU is not operating, the indication does not necessarily mean the Z80
chip is bad. There could be some conflict along the Z80 address or data bus
that might be preventing the Z80 from executing instructions.


THE Z80 CHECK PROGRAM DESCRIPTION

The Z80 Check program is short and performs 3 tasks as indicated below.

1. Attempts to set up a TV display similar to SetScreen.

2. Checks for a "jump to" sentinel C3 at cassette address 2000H and jumps to
   that location if the sentinel is present. Only a "custom" cartridge will
   execute in the cassette slot because the Z80 Check program does not include
   a UPI processor or any on-board ROM subroutines.

3. Executes a routine that counts up from 00 to FF hex each second and displays
   the count on the dual display. Execution is nonstop. When the count reaches
   99, it is reset to 00 for the next count.


HOW TO EXECUTE "Z80 CHECK"

1. Set the EEPROM multi-cart DIP switches to 10. Switch 2 is the most significant
   setting (1) and switch 1 is the least significant setting (0). The setting
   "zero" is toward the EEPROM. The setting 1 is away from the EEPROM.

2. Flip, if necessary, the mini-toggle switch near the dual display, in the
   "Remote ROM" position, toward the left, away from the EEPROM.

3. Press the system reset button, to run the Z80 Check program.




THE "Z80 CHECK" PROGRAM LISTING


Z80 CHECK

Intended for MCM Design's BalcheckHR board
A MCM Design program
Nov 2018

This program was added to MCM Design's BalcheckHR package in the form of a
multi-carted 32KB EEPROM. The program was loaded into the EEPROM's 8KB
Bank 2.

This program was hand written and "texted in" using Windows Notepad.


0000H 00           NOP
      F3           DI
      C3 47 00     JP PGM


++++++++++++++++++++++++++++++++++++++++++

COLOR TABLE

CTBL
0005H AC  green   pixel 11, left colors
      86  yellow        10
      07  white         01
      00  black         00
      CD  cyan    pixel 11, right colors
      79  brown         10
      2B  magenta       01
000CH F9  blue          00

+++++++++++++++++++++++++++++++++++++++++

7-SEGMENT LED DISPLAY DIGIT DRIVERS (0-F)

Bits    7 6 5 4 3 2 1 0 
Segment   g f e d c b a

DTBL      displays
000DH 3F     0
      06     1
      5B     2
0010H 4F     3
      66     4
      6D     5
      7D     6
      07     7
      7F     8
      67     9
      77     A
      7C     b
      39     C
      5E     d
      79     E
001CH 71     F

Notes:Hex B=b, lower case b looks similar to 6
      Hex D=d

++++++++++++++++++++++++++++++++++++++++++

DISPLAY DIGITS

Enter with:  A = double digit counter to display
            IX = program "continue address" to jump to

Note registers B, C and D are clobbered

DSPLY
001DH 01 0D 00     LD BC,DTBL          point BC at digit drivers table
0020H 57           LD D,A              save "counter to display"
      E6 F0        AND 1111 0000       A = most significant digit
      0F           RRCA                rotate left nibble right to bits 3-0
      0F           RRCA
      0F           RRCA
      0F           RRCA
      81           ADD A,C             point BC at digit driver to output
      4F           LD C,A
      0A           LD A,(BC)           put driver in A
      D3 EF        OUT (LDSPLY),A      output driver to left display
      0E 0D        LD C,0D             point BC at driver table again
      7A           LD A,D              A = "counter to display" again
      E6 0F        AND 0000 1111       A = LSD
0031H 81           ADD A,C             point BC at digit driver to output
      4F           LD C,A
      0A           LD A,(BC)           put driver in A
      D3 FF        OUT (RDSPLY),A      output driver to right display
      DD E9        JP (IX)             jump to continue program

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

"WAIT 1 SEC" DELAY ROUTINE

ENter with: HL = program "continue address" to jump to

DELAY
0038H 16 02        LD D,2              D=counter1=2
DELAY1
      3E FF        LD A,FF             A=counter2=255
DELAY2
      06 FF        LD B,FF             B=counter3=255
DELAY3
      10 FE        DJNZ DELAY3         loop back to DELAY3 255 times
0040H 3D           DEC A
      20 F9        JR NZ,DELAY2        loop back to DELAY2 255 times
      15           DEC D
      20 F4        JR NZ,DELAY1        loop back to DELAY1 2 times
0046H E9           JP (HL)             jump to continue program

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PROGRAM


SET UP TV DISPLAY

PGM
0047H AF           XOR A               A=0
      D3 08        OUT (08),A          set custom chips to run in low-res
      01 18 08     LD BC,0818          stop any sound
      ED 79        OUT (C),A
      10 FC        DJNZ -2
0051H 3E CC        LD A,CC             set vertical blank reg to 204
      D3 0A        OUT (0A),A
      3E 14        LD A,14             set horiz color bndry to 20, split screen
      D3 09        OUT (09),A
      21 05 00     LD HL,CTBL          set colors
      01 0B 08     LD BC,080B
      ED B3        OTIR
0061H 21 00 40     LD HL,4000          fill top 1/3 of screen with color AA
      01 50 05     LD BC,0550
      3E AA        LD A,1010 1010
MFILL1
0069H 77           LD (HL),A
      ED A1        CPI
      EA 69 00     JP PE,MFILL1
      01 A8 02     LD BC,02A8          fill next 17 lines with color FF
0072H 3E FF        LD A,FF
MFILL2
0074H 77           LD (HL),A
      ED A1        CPI
      EA 74 00     JP PE,MFILL2
      3E 55        LD A,55             fill top 2 corner bytes with color 55
      32 00 40     LD (4000),A
      32 27 40     LD (4027),A


CHECK FOR 2000H SENTINEL


0082H 3A 00 20     LD A,(FIRSTC)      jump to 2000H if jmp sentinel C3 present
      FE C3        CP C3
      CA 00 20     JP Z,FIRSTC


RUN Z80 TO COUNT UP DUAL DISPLAY

Notes
Display counts up 00 to FF in hex and repeats nonstop.
This routine utilizes a nonstandard driver table allowing hex numbers to be
displayed.
HEX B is displayed as a lower case b and looks similar to 6.
Hex D is displayed as a lower case d.

008AH 3E 40        LD A, 0100 0000    A = dash driver
      D3 EF        OUT (LDSPLY),A     initialize display to - - (dash dash)
      D3 FF        OUT (RDSPLY),A
0090H 21 96 00     LD HL,INCD         HL = continue address
      C3 38 00     JP DELAY           wait 1 sec
INCD
0096H 1E 00        LD E,00            zero the counter
INCD1
0098H 7B           LD A,E             put counter in A
      DD 21 A0 00  LD IX,INCD2        IX = continue address
      C3 1D 00     JP DSPLY           display the counter digits
INCD2
00A0H 21 A6 00     LD HL,INCD3        HL = continue address
      C3 38 00     JP DELAY           wait 1 sec
INCD3
00A6H 1C           INC E              increment counter
00A7H C3 98 00     JP INCD1           loop back for next display


CHECKSUM ADJUSTMENT (to get checksum A4)

00AAH D5

00AB-1FFFH = FF hex

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


TROUBLESHOOTING LOOPS


Included in the BalcheckHR package are 2 custom troubleshooting loops for
possible use with a logic analyzer. These 2 loops will execute even if RAM is
not operating. To execute them, the user must hold down a specific key in the
right most keypad column 0 and then press the system reset button. The loops
are executed immediately following the inialization of the dual display to
-- (dash dash).


THE WRITE LOOP


This loop writes nonstop the data byte 66 hex to the screen RAM address 4696H.

To execute this loop, hold down key 0 (zero) while pressing the system reset
button.


WRITE LOOP LISTING


301AH 3E 66       LD A,66           write with 66H
301CH 21 96 46    LD HL,4696
301FH 77          LD (HL),A         write at 4696H with loop nonstop
3020H 18 FD       JR A301F

Z80 Data Line  7 6 5 4 3 2 1 0
Write Data     0 1 1 0 0 1 1 0

Z80 Address Line  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Address Data      0  1  0  0  0  1  1 0 1 0 0 1 0 1 1 0




THE READ LOOP


This loop writes the data byte 66 hex to the screen RAM address 4696H. Then,
reads the RAM address 4696H nonstop.

To execute this loop, hold down key C while pressing the system reset button.



READ LOOP LISTING

314CH 3E 66       LD A,66           read with 66H
314EH 21 96 46    LD HL,4696
3151H 77          LD (HL),A
3152H 7E          LD A,(HL)         read at 4696H with loop nonstop
3153H 18 FD       JR A3152

Z80 Data Line  7 6 5 4 3 2 1 0
Read Data      0 1 1 0 0 1 1 0

Z80 Address Line  15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Address Data      0  1  0  0  0  1  1 0 1 0 0 1 0 1 1 0





End of document
MCM Design
Dec 2018